﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Matrix_network
{
    public partial class Messages : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack) { MsgMultiView.ActiveViewIndex = 0;
            IncomeLinkButton.Font.Size = FontUnit.Large;
            SendedLinkButton.Font.Size = FontUnit.Medium;
            }
            
            
        }

        protected void MessagesDataSource_Init(object sender, EventArgs e)
        {
            MessagesDataSource.SelectParameters["id"].DefaultValue =
                User.Identity.Name;
            MessagesDataSource.DataBind();
        }

        protected void MessagesDataSource_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
        {

        }

       

        protected void IncomeLinkButton_Click(object sender, EventArgs e)
        {
            MsgMultiView.ActiveViewIndex = 0;
            IncomeLinkButton.Font.Size = FontUnit.Large;
            SendedLinkButton.Font.Size = FontUnit.Medium;

        }

        protected void SendedLinkButton_Click(object sender, EventArgs e)
        {
            MsgMultiView.ActiveViewIndex = 1;
            IncomeLinkButton.Font.Size = FontUnit.Medium;
            SendedLinkButton.Font.Size = FontUnit.Large;
        }

        protected void OutListView_Init(object sender, EventArgs e)
        {
            OutMessagesDataSource.SelectParameters["id"].DefaultValue =
                User.Identity.Name;
            OutMessagesDataSource.DataBind();

        }
    }
}